package defaultPackage;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
public class Background 
{
	BufferedImage background;
	int screenWidth, screenHeight;
	public Background()
	{
		background = new BufferedImage(Grid.dimensionx * 10,Grid.dimensiony * 10,BufferedImage.TYPE_INT_ARGB);
		Graphics g = background.getGraphics();
		g.setColor(Color.white);
		for (int i = 1; i <= 400; i++)
		{
			g.fillOval((int)(Math.random() * (Grid.dimensionx * 10)),(int)(Math.random()* (Grid.dimensiony * 10)) , 3, 3);
		}
		g.setColor(Color.cyan);
		for (int j = 1; j <= 75; j++)
		{
			int r = (int)(Math.random()*3+.5);
			g.fillOval((int)(Math.random() * (Grid.dimensionx * 10)),(int)(Math.random()* (Grid.dimensiony * 10)) , 2*r, 2*r);
		}
		g.setColor(Color.orange);
		for (int k = 1; k <= 50; k++)
		{
			int r = (int)(Math.random()*3+.5);
			g.fillOval((int)(Math.random() * (Grid.dimensionx * 10)),(int)(Math.random()* (Grid.dimensiony * 10)) , 3*r, 3*r);
		}
	}
	public void draw(Graphics g)
	{
		g.setColor(Color.black);
		g.fillRect(0, 0, (Grid.dimensionx * 10), (Grid.dimensiony * 10));
		g.drawImage(background, 0, 0, null);
	}
	
}
